package com.wsd.jing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wsd.jing.entity.RolePermission;
import com.wsd.jing.dto.UserDTO;
import com.wsd.jing.entity.User;
import com.wsd.jing.request.CommonRequest;
import com.wsd.jing.vo.UserInfoVO;
import com.wsd.jing.vo.UserVO;

import java.util.List;
import java.util.Map;

/**
 * All rights Reserved, Designed By www.tom.com
 *
 * @author tom
 * @version 1.0.0
 * @projectName: jing
 * @packageName: com.wsd.jing.service
 * @className: IUserService
 * @description: 用户服务类
 * @createDate 2022-11-14 07:02
 * @copyright 2022-11-14 07:02 www.tom.com Inc. All rights reserved.
 */
public interface IUserService extends IService<User> {

    /**
     * @param userDto:用户信息
     * @return Boolean
     * @author tom
     * @description 新增用户
     * @createDate 2022-11-14 07:02
     */
    Boolean insertUser(UserDTO userDto);

    /**
     * @param userDto:用户信息
     * @return Boolean
     * @author tom
     * @description 修改用户
     * @createDate 2022-11-14 07:02
     */
    Boolean updateUser(UserDTO userDto);

    /**
     * @param id:用户ID
     * @return Boolean
     * @author tom
     * @description 删除用户
     * @createDate 2022-11-14 07:02
     */
    Boolean deleteUser(Integer id);

    /**
     * @param ids:用户ID
     * @return Boolean
     * @author tom
     * @description 批量删除用户
     * @createDate 2022-11-14 07:02
     */
    Boolean deleteUsers(String ids);

    /**
     * @param id:用户ID
     * @return UserDetailVO
     * @author tom
     * @description 查询用户
     * @createDate 2022-11-14 07:02
     */
    UserVO getUser(Integer id);

    /**
     * @param commonRequest:排序参数
     * @param user:用户信息
     * @return List<User>
     * @author tom
     * @description 查询用户列表
     * @createDate 2022-11-14 07:02
     */
    List<User> listUsers(CommonRequest commonRequest, User user);

    /**
     * @param commonRequest:分页参数
     * @param user:用户信息
     * @return Map<String, Object>
     * @author tom
     * @description 分页查询用户列表
     * @createDate 2022-11-14 07:02
     */
    Map<String, Object> listPageUsers(CommonRequest commonRequest, User user);

    /**
     * @param account:账号
     * @return User
     * @author tom
     * @description 根据账号查询用户信息
     * @createDate 2022/11/14 11:49
     */
    User getUserByAccount(String account);

    /**
     * @param :
     * @return UserVO
     * @author tom
     * @description 查询用户信息（用户信息，菜单信息，权限信息）
     * @createDate 2022/11/16 13:03
     */
    UserInfoVO getUserInfo();

    /**
     * @param id:用户ID
     * @return Boolean
     * @author tom
     * @description 重置用户密码
     * @createDate 2022/12/1 18:48
     */
    Boolean resetPassword(Integer id);

    /**
     * @param id:用户ID
     * @return RolePermission
     * @author tom
     * @description 查询用户数据权限列表
     * @createDate 2023/12/21 14:27
     */
    RolePermission getUserRolePermission(Integer id);
}
